package day06.Lx;

public class Lian10 {
    public static void main(String[] args) {
//        int[]arr={1,2,3,4};
        try {
            int[]arr=null;
            for (int i = 0; i < arr.length; i++) {
                System.out.println(arr[i]);
            }
        } catch (NullPointerException e) {
            System.out.println("空指针异常");
        }
    }
}
